/*
 * Copyright (c) 2006, 2022, webrx.cn All rights reserved.
 *
 */
package cn.ex;

import lombok.Data;
import lombok.Setter;

import java.lang.reflect.Method;

/**
 * <p>Project: javase2203 - Student
 * <p>Powered by webrx On 2022-08-11 09:44:03
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
@Anns(values = {@Ann(name = "李四", age = 22, address = "河南郑州", value = "备注信息..."), @Ann(name = "李四", age = 22, address = "河南郑州", value = "备注信息...")})
@Data
@Setter
public class Student {
    @Ann(name = "李四", age = 22, address = "河南郑州", value = "备注信息...")
    public void show() {
        Class c = Student.class;
        try {
            Method m = c.getMethod("show");
            System.out.println(m.getName());
            Ann ann = m.getAnnotation(Ann.class);
            System.out.println(ann.name());
            System.out.println(ann.address());
            System.out.println(ann.value());
            System.out.println(ann.age());
        } catch (NoSuchMethodException e) {
            throw new RuntimeException(e);
        }
    }

}
